package com.netflexitysolutions.amazonws.ec2.internal.operations;

import com.amazonaws.ec2.doc._2009_04_04.DeleteKeyPairType;
import com.netflexitysolutions.amazonws.ec2.EC2;

public class DeleteKeyPairOperation extends SingleObjectOperationExecutor<DeleteKeyPairType, Boolean> {

	public DeleteKeyPairOperation(EC2 ec2, String keyName) {
		super(ec2, keyName);
	}

	@Override
	protected Boolean call(DeleteKeyPairType request) {
		request.setKeyName(objectId);
		return getEC2().getService().deleteKeyPair(request).isReturn();
	}

}
